<template>
<div>
  <input type="text" @keyup.enter="fn">
  <input type="password"  @keyedown.esc="fn1">
</div>
</template>

<script>
export default {
  data(){

  },
  methods:{
    fn(event){
      console.log(event.key);
      console.log(1111);
    },
      fn1(event){
      console.log(event.key);
      console.log(1111);
    }
  }
};
</script>

<style leng="less">

</style>
